import React, { Component } from 'react';
import style from './home_header.module.css';
import { MessageOutlined } from '@ant-design/icons';
import {connect} from "react-redux"
import { Link } from "react-router-dom"
export class Home_search extends Component {
    
    render() {
        let dizhi = this.props.dizhi
        return (
            <div className={style.home_header}>
                <div className={style.search_box}>
                    <div onClick={this.props.changeChouti} className={style.address}>
                        {dizhi.name}
                    </div>
                    <Link to="/list">
                    <input placeholder="请输入楼盘名称" className={style.search} ></input></Link>
                    <button className={style.btn}>搜索</button>
                </div>
                <Link to="/xiaoxi">
                    <div>
                        <MessageOutlined style={{ fontSize: '0.6rem', color: '#fff',marginLeft:'0.2rem' }} />
                    </div>
                </Link>
            </div>
        );
    }
}
export default connect(
    state => ({
        dizhi : state.citylist
    }),
)(Home_search)